/**
 * erp列表页公用方法
 */
import { putAction } from '@/services/manage'
export default {
  methods: {
    handleSubmit(bizNo) {
      putAction(`${this.url.submit}${bizNo}`).then(res => {
        if (res.success) {
          this.$message.success(res.message)
          this.loadData()
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    handleCheck(bizNo) {
      putAction(`${this.url.audit}${bizNo}`).then(res => {
        if (res.success) {
          this.$message.success(res.message)
          this.loadData()
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    handleBackOut(bizNo) {
      putAction(`${this.url.abandon}${bizNo}`).then(res => {
        if (res.success) {
          this.$message.success(res.message)
          this.loadData()
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    handleOpen(bizNo) {
      putAction(`${this.url.open}${bizNo}`).then(res => {
        if (res.success) {
          this.$message.success(res.message)
          this.loadData()
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    handleClose(bizNo) {
      putAction(`${this.url.close}${bizNo}`).then(res => {
        if (res.success) {
          this.$message.success(res.message)
          this.loadData()
        } else {
          this.$message.warning(res.message)
        }
      })
    }
  }
}

